求1+2+3+...+n Posted on 2019-10-13 | | reads times 求1+2+3+…+n题目描述 求1+2+3+…+n,要求不能使用乘除法、for、while、if、else、switch、case等关键字及条件判断语句(A?B:C)。 递归 12345function Sum_Solution(n){ // write code here return n&&Sum_Solution(n-1)+n} Post author: GoldMiner Xun Post link: https://goldminerxun.github.io/2019/10/13/%E5%89%91%E6%8C%87offer%20JavaScript%E7%89%88%20(47)/ Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 3.0 unless stating additionally.